using System;
using FluentNHibernate.Testing;
using NUnit.Framework;
using RMH.Entities;

namespace RMH.IntegrationTests.Repository
{
    [TestFixture]
    public class StayRepositorySpecs : RepositoryBaseSpecs
    {
        [Test]
        public void can_persist_all_properties()
        {
            new PersistenceSpecification<Stay>(GetSession())
                .CheckProperty(x => x.HospitalUnit, "ASDASD")
                .CheckProperty(x => x.HospitalRoomNumber, "HospitalRoomNumber")
                .CheckProperty(x => x.HospitalPhoneNumber, "HospitalPhoneNumber")
                .CheckProperty(x => x.MedicaidNumber, "MedicaidNumber")
                .CheckProperty(x => x.SocialWorkerName, "SocialWorkerName")
                .CheckProperty(x => x.CheckinDate, new DateTime(1999, 3, 22))
                .CheckProperty(x => x.CheckoutDate, new DateTime(1999, 1, 1))
                .CheckProperty(x => x.PreauthorizationSentDate, new DateTime(1999, 1, 1))
                .CheckProperty(x => x.PreauthorizationApprovedDate, new DateTime(1999, 1, 1))
                .CheckProperty(x => x.Type, OccupancyType.Patient)
                .VerifyTheMappings();
        }        
    }
}